<link href="http://localhost/citest/css/style.css" rel="stylesheet" type="text/css"/>
<?php $this->load->view("includes/header")?>
<?php $this->load->view("includes/sidebar-admin")?>
<?php $this->load->view("includes/sidebar-b")?>

<div id="content">
<h2>Manage Categories</h2>
<table>
	<thead>
		<tr>
                    <th>Categories</th>
                    <th>Posted on</th>
                    <th>Posted by</th>
                    <th>Content</th>
                    <th>Edit</th>
                    <th>Delete</th>
		</tr> 
	</thead>
        <?php 
            foreach ($pages as $pg){
                ?>
                    <tr>
                        <td><?php echo $pg['page_name'];?></td>
                        <td><?php echo $pg['post_on'];?></td>
                        <td><?php echo $pg['user_id'];?></td>
                        <td><?php echo $pg['content'];?></td>
                        <td><a class = 'edit' href ='../c_pages/edit?pg=<?php echo $pg['page_id'];?>'>Edit</a></td>
                        <td><a class = 'delete' onclick="return confirm('Are you sure?')" href ='../c_pages/delete?pg=<?php echo $pg['page_id'];?>'>Delete</td>
                    </tr>
                   
          <?php }
        ?>  
</table>
</div><!--end content-->
<?php $this->load->view("includes/footer")?>